import axios from 'axios';
import { req } from './axiosFun';
const rulApi = 'https://tools.mimeyummy.fun/yundongshou';
/**
 * 支付配置信息
 **/
// 支付配置信息-获取支付配置信息列表
export const MachineConfigList = (params) => { return req("post", "/api/MachineConfig/list", params) };
// 支付配置信息-保存支付配置信息
export const MachineConfigSave = (params) => { return req("post", "/api/MachineConfig/save", params) };
// 支付配置信息-删除支付配置信息
export const MachineConfigDelete = (params) => { return axios.delete("/api/MachineConfig/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };

/**
 * 支付配置 
 **/
// 支付配置-获取支付配置列表
export const finishOrderstatus = (params) => { return req("post", rulApi + "/web/finish_order", params) };
// 【订单】回收员分配后保存
export const ConfigSave = (params) => { return req("post", rulApi + "/web/deliver_userorder", params) };
// 【订单】取消订单接口/api/update_order_status
export const updateOrder = (params) => { return req("PUT", rulApi+"/update_order_status", params) };
// 支付配置-删除支付配置
export const ConfigDelete = (params) => { return axios.delete("/web/api/Config/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };

/**
 * yundongshou订单管理
 **/
// 【订单】管理员获取待分配的订单列表
export const OrderList = (params) => { return req("get", rulApi + "/web/query_deliver_orders?page="+params.page+"&limit="+params.limit, params) };
// 【订单】管理员获取待支付的订单列表
export const waitPayList = (params) => { return req("get", rulApi + "/web/query_zhifu_orders?page="+params.page+"&limit="+params.limit, params) };
// 【订单】管理员获完成与取消的订单列表
export const finishOrderList = (params) => { return req("get", rulApi+"/web/query_finished_orders?page="+params.page+"&limit="+params.limit+"&status="+params.orderStatus, params) };
// 【订单】订单更新提醒
export const neworders = (params) => { return req("get", rulApi + "/web/query_web_exists_neworders", params) };
// 【订单】订单对应收款码
export const getMoneyCode = (params) => { return req("get", rulApi + "/web/query_finished_orders_zhifuurl?orderid="+params, params) };

// 交易订单-s删除交易订单
export const OrderDelete = (params) => { return axios.delete("/api/Order/delete?ids=" + params + "&token=" + localStorage.getItem('logintoken')).then(res => res.data) };
// 交易订单-交易订单退款
export const OrderRefund = (params) => { return req("post", "/api/Order/refund", params) };